const controllers = require("../controllers/user");
const authorization = require('../middleware/authorization');
const adminAuthorization = require('../middleware/adminAuthorization');
module.exports = router => {
    // router.prefix('/');
    router.get('/user/one/:id', adminAuthorization(), controllers.index);
    router.get('/user/list', adminAuthorization(), controllers.list);
    router.post('/user/add', adminAuthorization(), controllers.create);
    router.post('/user/update', adminAuthorization(), controllers.update);
    router.post('/user/delete', adminAuthorization(), controllers.delete);
    //小程序
    router.post('/user/wechatDecryptUserData', authorization(), controllers.wechatDecryptUserData);
};
